package com.hiss.basic.model.system.request;

import com.hiss.basic.model.system.domain.SysDictItemDomain;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 系统字典项更新请求
 */
@Data
@AutoMapper(target = SysDictItemDomain.class)
public class SysDictItemUpdateRequest implements Serializable {

    private static final long serialVersionUID = 1;

    @NotNull(message = "字典项 ID 不能为空")
    private Long id;

    /**
     * 字典标签
     */
    @NotBlank(message = "字典标签不能为空")
    private String label;

    /**
     * 标签颜色
     */
    private String color;

    /**
     * 字典键值
     */
    @NotBlank(message = "字典键值不能为空")
    private String value;

    /**
     * 字典排序
     */
    @NotNull(message = "字典排序不能为空")
    private Integer sort;

    /**
     * 备注
     */
    private String remark;

    /**
     * 字典 ID
     */
    @NotNull(message = "字典 ID 不能为空")
    private Long dictId;

    /**
     * 启用状态
     *
     * @see com.hiss.basic.starter.core.enums.EnableStatusEnum
     */
    @NotNull(message = "启用状态不能为空")
    @Range(min = 0, max = 1, message = "非法启用状态值")
    private Integer enableStatus;
}
